﻿using System;
using System.Collections.Generic;

namespace Eneta.Portal.Common.Dto
{
    /// <summary>
    /// Class for IO first level items. This class is serializable so it possible to serialize 
    /// it as string for different caching mechanisms.
    /// </summary>
    [Serializable]
    public class IoLevel1
    {
        /// <summary>
        /// Gets or sets the id of first level item.
        /// </summary>
        public int Id { get; internal set; }

        /// <summary>
        /// Gets or sets the title of first level item.
        /// </summary>
        public string Title { get; set; }

        /// <summary>
        /// Gets or sets the list of second level items that are children for this 
        /// first level item.
        /// </summary>
        public IList<IoLevel2> Level2Items { get; internal set; }

        /// <summary>
        /// Initializes a new instance of the <see cref="IoLevel1"/> class.
        /// </summary>
        public IoLevel1()
        {
            Level2Items = new List<IoLevel2>();    
        }
    }
}
